]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Disable the overview hotcorner when we have a full-screen window open
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 10 Mar 2013 02:12:37 +0000 (21:12 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sun, 10 Mar 2013 16:00:09 +0000 (12:00 -0400)
For the same reasons that we disable the tray barrier, we should
disable hot corners as well -- when users have a full-screen game
open, we shouldn't allow overview activation by the hotcorner.

https://bugzilla.gnome.org/show_bug.cgi?id=694997

js/ui/layout.js

index d24d1475c60c39eccc32b8026ce430140e00f54c..381676dc4eef3b89a09c7338dd9e1c2b3862df18 100644 (file)
@@ -326,7 +326,7 @@ const LayoutManager = new Lang.Class({
                     continue;
             }
 
-            let corner = new HotCorner(this, cornerX, cornerY);
+            let corner = new HotCorner(this, monitor, cornerX, cornerY);
             corner.setBarrierSize(size);
             this.hotCorners.push(corner);
         }
@@ -1107,13 +1107,15 @@ Signals.addSignalMethods(LayoutManager.prototype);
 const HotCorner = new Lang.Class({
     Name: 'HotCorner',
 
-    _init : function(layoutManager, x, y) {
+    _init : function(layoutManager, monitor, x, y) {
         // We use this flag to mark the case where the user has entered the
         // hot corner and has not left both the hot corner and a surrounding
         // guard area (the "environs"). This avoids triggering the hot corner
         // multiple times due to an accidental jitter.
         this._entered = false;
 
+        this._monitor = monitor;
+
         this._x = x;
         this._y = y;
 
@@ -1247,6 +1249,9 @@ const HotCorner = new Lang.Class({
     },
 
     _toggleOverview: function() {
+        if (this._monitor.inFullscreen)
+            return;
+
         if (Main.overview.shouldToggleByCornerOrButton()) {
             this._rippleAnimation();
             Main.overview.toggle();